package com.suineg.pms.commons;

import org.apache.shiro.SecurityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.suineg.pms.service.account.ShiroDbRealm.ShiroUser;

/**
 *	获取当前登陆用户
 *@author Suine
 */
public class UserHoder {
	/** 日志输出对象 */
	protected final Logger logger = LoggerFactory.getLogger(getClass());
	
	
	public static ShiroUser getCurrentShiroUser(){
		return (ShiroUser) SecurityUtils.getSubject().getPrincipal();
	}
}

